//
// Created by guanyicheng on 2021/11/8.
//

#include <iostream>

using namespace std;

int main() {
    int input;
    cin >> input;
    if (!input) {
        cout << input << endl;
        return 0;
    }
    while (input > 0) {
        cout << input % 10;
        input /= 10;
    }
    cout << endl;
    return 0;
}